<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Document</title>
</head>
<body>
  <div>单击</div>
  <script>
    var div = document.getElementsByTagName('div')[0];
    div.onclick = function (e) {
      var e = e || window.event;
      var target = e.target || e.srcElement;
      console.log(target);   // 结果为：<div>单击</div>
      console.log(this);     // 结果为：<div>单击</div>
    };
  </script>
</body>
</html>